<?php /* Smarty version 2.6.26, created on 2013-10-30 17:50:20
         compiled from ./admin/goods_update.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../templates/admin/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript" src="../js/jquery.js">
</script>
<script type="text/javascript" src="js/attr_oper.js">
</script>
<script type="text/javascript">
function charea(a) {
    var spans = ['general','detail','mix','properties'];
    for(i=0;i<4;i++) {
        var o = document.getElementById(spans[i]+'-tab');
        var tb = document.getElementById(spans[i]+'-table');
        o.className = o.id==a+'-tab'?'tab-front':'tab-back';
        tb.style.display = tb.id==a+'-table'?'block':'none';
    }
    
}
</script>

<!-- start goods form -->
<div class="tab-div">
    <!-- tab bar -->
    <div id="tabbar-div">
      <p>
        <span class="tab-front" id="general-tab" onclick="charea('general');">通用信息</span>
        <span class="tab-back" id="detail-tab" onclick="charea('detail');">详细描述</span>
        <span class="tab-back" id="mix-tab" onclick="charea('mix');">其它信息</span>
		<span class="tab-back" id="properties-tab" onclick="charea('properties');">商品属性</span>		
      </p>
    </div>

    <!-- tab body -->
    <div id="tabbody-div">
      <form enctype="multipart/form-data" action="goods.php?act=update" method="post" name="theForm" >

        <input type="hidden" name="MAX_FILE_SIZE" value="2097152" />

        <table width="90%" id="general-table" align="center">
          <tr>
            <td class="label">商品名称：</td>
            <td><input type="text" name="goods_name" value="<?php echo $this->_tpl_vars['row']['goods_name']; ?>
" style="float:left;color:;" size="30" /></td>
          </tr>
          <tr>
            <td class="label">商品分类：</td>
            <td>
            
            <select name="cat_id">
	        <option value="0">请选择...</option>
	        <?php $_from = $this->_tpl_vars['cat_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
	        <option value="<?php if ($this->_tpl_vars['list']['cat_id'] == $this->_tpl_vars['row']['cat_id']): ?><?php echo $this->_tpl_vars['list']['cat_id']; ?>
" selected="selected"<?php else: ?><?php echo $this->_tpl_vars['list']['cat_id']; ?>
<?php endif; ?>"><?php if ($this->_tpl_vars['list']['lev'] == 2): ?>&nbsp;&nbsp;<?php endif; ?><?php if ($this->_tpl_vars['list']['lev'] == 3): ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php endif; ?><?php echo $this->_tpl_vars['list']['cat_name']; ?>
</option>
	        <?php endforeach; endif; unset($_from); ?>
	        </select>
	        
             </td>
          </tr>
		  <tr>
            <td class="label">提供商家：</td>
            <td>
            <select name="mer_id">
                        <option value="0" selected="selected" >请选择商家...</option>
                        <?php $_from = $this->_tpl_vars['merList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
	        			<option value="<?php if ($this->_tpl_vars['list']['mer_id'] == $this->_tpl_vars['row']['mer_id']): ?><?php echo $this->_tpl_vars['list']['mer_id']; ?>
" selected="selected"<?php else: ?><?php echo $this->_tpl_vars['list']['mer_id']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['list']['mername']; ?>
</option>
                        <?php endforeach; endif; unset($_from); ?>
		    </select>
             </td>
          </tr>
          <tr>
            <td class="label">市场价：</td>
            <td><input type="text" name="market_price" value="<?php echo $this->_tpl_vars['row']['market_price']; ?>
" size="20" /></td>
          </tr>
          <tr>
            <td class="label">本店售价：</td>
            <td><input type="text" name="shop_price" value="<?php echo $this->_tpl_vars['row']['shop_price']; ?>
" size="20" /></td>
          </tr>
          
          <tr>
            <td class="label">上传商品图片：</td>
            <td>
              <input type="file" name="ori_img" size="35" />
            </td>
          </tr>
        </table>

        <!-- 详细描述 -->
        <table width="90%" id="detail-table" style="display:none">
          <tr>
            <td><textarea name="goods_desc" ></textarea></td>
          </tr>
        </table>

        <!-- 其他信息 -->
        <table width="90%" id="mix-table" style="display:none" align="center">
          <tr>
            <td class="label"><a href="#" title="点击此处查看提示信息"><img src="./images/notice.gif" width="16" height="16" border="0" alt="点击此处查看提示信息"></a>商品库存数量</td>

            <td><input type="text" name="goods_number" value="<?php echo $this->_tpl_vars['row']['goods_number']; ?>
" size="20" />
          </tr>
          <tr>
            <td class="label">加入推荐：</td>
            <td><input type="checkbox" name="is_best" value="1" <?php if ($this->_tpl_vars['row']['is_best'] == 1): ?>checked="checked"<?php endif; ?> />精品<input type="checkbox" name="is_new" value="1" <?php if ($this->_tpl_vars['row']['is_new'] == 1): ?>checked="checked"<?php endif; ?> />新品 <input type="checkbox" name="is_hot" value="1" <?php if ($this->_tpl_vars['row']['is_hot'] == 1): ?>checked="checked"<?php endif; ?> />热销</td>
          </tr>
          <tr id="alone_sale_1">
            <td class="label" id="alone_sale_2">上架：</td>
            <td id="alone_sale_3"><input type="checkbox" name="is_on_sale" <?php if ($this->_tpl_vars['row']['is_on_sale'] == 1): ?> value="1" checked="checked"<?php else: ?> value="0" <?php endif; ?> />打勾表示允许销售，否则不允许销售。</td>
          </tr>
          <tr>
            <td class="label">商品关键词</td>
            <td><input type="text" name="keywords" value="<?php echo $this->_tpl_vars['row']['goods_desc']; ?>
" size="40" />用空格隔开</td>
          </tr>
          <tr>
            <td class="label">商品简单描述</td>
            <td><textarea name="goods_brief" cols="20" rows="5"></textarea></td>
          </tr>
        </table>
        	
		<!-- 商品属性 -->
        <table width="90%" id="properties-table" style="display:none" align="center">
          <tr id="location">
              <td class="label">商品类型：</td>
              <td>
               	<select name="cat_id" onchange="attr(this)">
		        <option value="0">请选择...</option>
		        <?php $_from = $this->_tpl_vars['cat_list2']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
		        <option value="<?php echo $this->_tpl_vars['list']['cat_id']; ?>
" <?php if ($this->_tpl_vars['list']['cat_id'] == $this->_tpl_vars['row']['cat_id']): ?> selected="selected"<?php endif; ?> ><?php echo $this->_tpl_vars['list']['cat_name']; ?>
</option>
		        <?php endforeach; endif; unset($_from); ?>
		        </select>
		      </td>
          </tr>
        </table>
        
  
        <div class="button-div">
          <input type="hidden" name="act" value="insert" />
          <input type="hidden" name="goods_id" value="<?php echo $this->_tpl_vars['row']['goods_id']; ?>
" />
          <input type="submit" value="确定" class="button" />
          <input type="reset" value="重置" class="button" />
        </div>
      </form>
    </div>
</div>
<!-- end goods form -->

</body>
</html>